package Models;

public class Hops {
    private int hopID;
    private String hopName;
    private double hopAlphaAcid;
    private boolean wholeHop;
    private double hopBagWeight;
    private double hopOnHand;
    private double hopSpoken;
    private double hopOnOrder;
    private double hopMinimum;
    private double hopCost;
    private StockCode stockCode;
    //The values below are used in inventory calculations
    private double hopToOrder = 0;
    
	public int getHopID() {
		return hopID;
	}
	public void setHopID(int hopID) {
		this.hopID = hopID;
	}
	public String getHopName() {
		return hopName;
	}
	public void setHopName(String hopName) {
		this.hopName = hopName;
	}
	public double getHopAlphaAcid() {
		return hopAlphaAcid;
	}
	public void setHopAlphaAcid(double hopAlphaAcid) {
		this.hopAlphaAcid = hopAlphaAcid;
	}
	public boolean isWholeHop() {
		return wholeHop;
	}
	public void setWholeHop(boolean wholeHop) {
		this.wholeHop = wholeHop;
	}
	public double getHopBagWeight() {
		return hopBagWeight;
	}
	public void setHopBagWeight(double hopBagWeight) {
		this.hopBagWeight = hopBagWeight;
	}
	public double getHopOnHand() {
		return hopOnHand;
	}
	public void setHopOnHand(double hopOnHand) {
		this.hopOnHand = hopOnHand;
	}
	public double getHopSpoken() {
		return hopSpoken;
	}
	public void setHopSpoken(double hopSpoken) {
		this.hopSpoken = hopSpoken;
	}
	public double getHopOnOrder() {
		return hopOnOrder;
	}
	public void setHopOnOrder(double hopOnOrder) {
		this.hopOnOrder = hopOnOrder;
	}
	public double getHopMinimum() {
		return hopMinimum;
	}
	public void setHopMinimum(double hopMinimum) {
		this.hopMinimum = hopMinimum;
	}
	public double getHopCost() {
		return hopCost;
	}
	public void setHopCost(double hopCost) {
		this.hopCost = hopCost;
	}
	public StockCode getStockCode() {
		return stockCode;
	}
	public void setStockCode(StockCode stockCode) {
		this.stockCode = stockCode;
	}
    
    //last two functions are for use in determining how much malt to order.
    public double getHopToOrder() {
            return hopToOrder;
    }

    public void setHopToOrder(final double maltToOrder) {
            this.hopToOrder = maltToOrder;
    }

    public void resetHopToOrder(){
        this.hopToOrder = 0;
    }
    
	public float getPOLineItemPrice(){
	    return ((float)this.getHopBagWeight() * (float)this.getHopCost());
	}
}
